package lexical;

public class Main {
    public static void main(String[] args) throws Exception {

        String s = "r:\rn:\n".
                replaceAll("\\r", "\\\\r").
                replaceAll("\\n", "\\\\n");
//        s = s.replaceAll("\r","\\r");
//        s = s.replaceAll("\n","\\n");
        System.out.println(s);
    }
}
